package aparicio.mbox.parse;

import static org.junit.Assert.*;

import org.junit.Test;

public class ReceivedDomainTestCase {

	@Test
	public void testParseReceivedDomain() {
		String file = "test\\aparicio\\mbox\\parse\\mbox_good.mbox";
		MboxFile mbox = new MboxFile(file);
		
		try {
			mbox.parse();
		} catch (Exception e) {
			e.printStackTrace();
			fail("Failed to correctly parse the emails");
		}
		
		assertEquals(1, mbox.getReceivedDomain().size());
		assertEquals("<gmail.com>", mbox.getReceivedDomain().get(0));
	}

}
